% LEARN BASELINE
% INPUT
% XTR - training data (n x d)
% YTR - training labels (n x 1)
% XTE - testing data (ne x d)
% YTE - testing labels (ne x 1)
% XTV - validation data (nv x d)
% YTV - validation labels (nv x 1)
% settings - a cell array containing the following fields
%	background - 0 or 1, is background model being used?
%	rks - 0 or 1, using random kitchen sinks?
%		ftimes - number of times to multiply features (used only with if rks == 1)
%	pca - 0 or 1, using pca?
%   	u - projection matrix (d x d95) (used only if pca == 1 AND projection matrix already computed)
%		m - feature mean vector (1 x d) (used only if pca == 1 AND projection matrix already computed)
function [res] = learn_baseline(XTR,YTR,XTE,YTE,XTV,YTV,settings)
	
	% addpath('hypotheses');
	
	
	[XTR,XTV,XTE,settings] = process(XTR,XTV,XTE,settings);
	
		
	% [n,d] = size(XTR);
	% vr = 0.33;	% validation ratio
	% vi = randsample(n, floor(n*vr));
	% tri = setdiff(1:n, vi);
	
	% data = {};
	% data.XTV = XTR(vi,:);
	% data.YTV = YTR(vi);
	% data.XTR = XTR(tri,:);
	% data.YTR = YTR(tri);
	% data.XTE = XTE;
	% data.YTE = YTE;
	
	data = {};
	data.XTV = XTV;
	data.YTV = YTV;
	data.XTR = XTR;
	data.YTR = YTR;
	data.XTE = XTE;
	data.YTE = YTE;
	res = linear_svm(data);
	
end